function CreateXMLHttpRequest()
{
        if ( window.XMLHttpRequest )
        {
                    // code for IE7+, Firefox, Chrome, Opera, Safari
                return new XMLHttpRequest()
        }
        else if (window.ActiveXObject )
        {
                    // code for IE6, IE5
                return new ActiveXObject("Microsoft.XMLHTTP")
        }
}



function Index_ChooseType (idtype)
{
    var id = idtype;
    var xmlhttp = CreateXMLHttpRequest()
    xmlhttp.onreadystatechange = function()
    {
        if ( xmlhttp.readyState == 4 && xmlhttp.status == 200)
            {
                 document.getElementById("DisplayNews").innerHTML=xmlhttp.responseText;
        }
    }
    var serverURL = "Processing/Index_ChangeType.php?id="+ id + "&t=" + (new Date()).getTime();
    xmlhttp.open("GET",serverURL,true);
    xmlhttp.send();
}
    
function Index_ChooseNews (idnews)
{
    var id = idnews;
    var xmlhttp = CreateXMLHttpRequest()
    xmlhttp.onreadystatechange = function()
    {
        if ( xmlhttp.readyState == 4 && xmlhttp.status == 200)
            {
                 document.getElementById("blockB-News").innerHTML=xmlhttp.responseText;
        }
    }
    var serverURL = "Processing/Index_ChooseNews.php?id="+ id + "&t=" + (new Date()).getTime();
    xmlhttp.open("GET",serverURL,true);
    xmlhttp.send();
}
    